OGRE 3D 1.7 Application Development Cookbook by 2012

OGRE 3D 1.7 Application Development Cookbook by 2012

Author:2012
Language: eng
Format: mobi, epub
Publisher: Packt Publishing
Published: 0101-01-01T00:00:00+00:00


The last step is to create the CDynamicTextureView::OnTimer procedure.Add code to the OnTimer procedure to read the next frame of the video clip, and copy it into the buffer for the dynamic texture.

LPBITMAPINFOHEADER lpbi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(Frame, ++m_FrameNumber);

LPVOID GetFrame = AVIStreamGetFrame(Frame, ++m_FrameNumber);

PixelBuffer->lock(Ogre::HardwareBuffer::HBL_DISCARD);

memcpy(PixelBuffer->getCurrentLock().data, lpbi + sizeof(LPBITMAPINFOHEADER) + 25, lpbi->biSizeImage);

PixelBuffer->unlock();



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.